﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>传递title属性到子组件</title>
</head>
<body>
    <div id="app">
        <blog-content v-bind:date-title="content"></blog-content>
    </div>
<!--引入vue文件-->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
    const vm = Vue.createApp({
        data() {
            return {
                content: "玉瘦檀轻无限恨，南楼羌管休吹。"
            }
        }
    });
    vm.component('blog-content', {
        props: ['dateTitle'],
        template: '<h3>{{ dateTitle }}</h3>'
    })
    vm.mount('#app');
</script>
</body>
</html>
